<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value='demo'}}
{{assign var="app" value='demo'}}
{{assign var="act" value='index'}}
{{assign var="table" value='demo'}}
{{assign var="td" value='7'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
{{include file="{{$smarty.const.PLUG}}chosen/chosen.html"}}

</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form name='search' class="router" action="index.php" method="get">
	<input type="hidden" name="app" value="{{$app}}"/>
	<ul class="bread">
		<li class="floatr">
			<a href="" class="btn"><i class="icon-chevron-left"></i>管理管理</a>
		</li>
		<li>
			id：<input type="text" class="input-mini" name="id" value="{{$smarty.get.id}}" />
		</li>
		<li>
			用户名：<input class="input-small" type="text" name="username" value="{{$smarty.get.username}}" />
		</li>
		<li>
			<select name="publish" class="chosen">
				<option {{if $smarty.get.publish==''}}selected="true"{{/if}} value="">全部</option>
				<option {{if $smarty.get.publish=='1'}}selected="true"{{/if}} value="1">已发布</option>
				<option {{if $smarty.get.publish=='0'}}selected="true"{{/if}} value="0">未发布</option>
			</select>
		</li>
		<li>
			<select name="select" class="chosen nochange">
				<option value="">请选择数据...</option>
				{{html_options options=$select selected=$smarty.get.select}}
			</select>
		</li>
		<li>
			{{html_radios name=radio options=$radio checked=$smarty.get.radio}}
			<!--{{html_checkboxes name=field options=$field checked=$smarty.get.radio}}-->
			<label class="radio inline">是:<input type="radio" checked="checked" value="1" name="hot"></label>
			<!--label class="checkbox inline">是:<input class="np" type="radio" checked="true" value="1" name="hot"></label-->
		</li>
		<li>
			注册日期： <input type="text" class="Wdate input-small" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="time" value="{{$smarty.get.time}}">
		</li>
		<li>
			<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
			<a href="index.php?app={{$app}}" class="a">清除</a>
		</li>
	</ul>
	</form>
	</div>

	<form name='form' action="index.php?app={{$app}}" method="post">
	<input type="hidden" name="app" value="{{$app}}"/>
	<input type="hidden" name="act" value=""/>
	<input type="hidden" name="table" value="{{$table}}"/>
	<table class="table table-bordered">
		<tr class="thead">
		  <td colspan="{{$td}}">
		  <div class="floatr">
			<a class="btn iframe" href="index.php?app={{$app}}&act=modify&iframe=true" title="编辑" width="1000" height="600"><i class="icon-plus"></i>弹窗编辑</a>
			<a class="btn" href="index.php?app={{$app}}&act=modify"><i class="icon-plus"></i>添加{{$title}}</a>
			<a class="btn iframe" title="iframe嵌入页面" width='1024px' height='650px' href="http://www.baidu.com"><i class="icon-globe"></i>iframe</a>
			<a class="btn" href="index.php?app={{$app}}&act=export&role_id={{$smarty.post.role_id}}&username={{$smarty.post.username}}&register_time={{$smarty.post.register_time}}"><i class="icon-list-alt"></i>导出EXCEL</a>
			<a class="btn delete btn-danger" href="index.php?app={{$app}}&act=delete"><i class="icon-trash icon-white"></i>批量删除</a>
			<!--a class="btn delete btn-danger" _act='cattegory_delete' href="javascript:"><i class="icon-trash icon-white"></i>批量删除(指定控制器)</a-->
			<a class="btn mydelete btn-danger" href="index.php?app={{$app}}&act=delete"><i class="icon-trash icon-white"></i>当前控制器删除</a>
		  </div>
		  ◆ {{$title}}管理 －> {{$title}}列表
		  </td>
		</tr>
		{{if !$result}}
		<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
		<tr class="ttitle">
			<th width="30"><label><input class="check_all" type="checkbox"/></label></th>
			<th>ID</th>
			<th>姓名</th>
			<th>缩略图</th>
			<th width="50">状态</th>
			<th width="100">排序  <img title="保存排序" class="save_order" style="width:20px;height:20px;cursor:pointer;" src="{{$smarty.const.__APP__}}images/system/save.png"/></th>
			<th width="150">操作</th>
		</tr>
		<tbody>
			{{foreach from=$result item=val key=key}}
			<tr>
				{{*全选*}}<td><label><input name="check_id[]" class="check_id" value="{{$val.id}}" type="checkbox"/></label></td>
				{{*ID*}}<td>{{$val.id}}<input type="hidden" name="ids[]" value="{{$val.id}}" /></td>
				{{*姓名*}}<td>{{$val.username}}</td>
				{{*缩略图*}}<td><a class="zoom" title="{{$val.title}}" href="{{$smarty.const.__PUB__}}{{$val.image}}"><img src="{{""|photo:50:50}}"/></a></td>
				{{*状态*}}<td><a class="ajaxSubmit refresh" link="index.php?app=functions&act=setValue&value={{!$val.publish}}&params={{'table='|cat:$table|cat:'&field=publish.id&id='|cat:$val.id|encode}}"><span class="select_{{$val.publish}}">&nbsp;</span></a></td>
				{{*排序*}}<td><input class="is_number" maxlength="4" type='text' name="order[]" style="width:25px;" value='{{$val.ordering}}'/></td>
				<td>
					<a href="index.php?app={{$app}}&act=modify&id={{$val.id}}" class="btn"><i class="icon-edit"></i>编辑</a>
					{{*删除*}}<a class='btn confirm ajaxSubmit btn-danger' title="删除将不可恢复,确定要删除吗?" link="index.php?app=functions&act=delete&table=demo&id={{$val.id}}"><i class="icon-trash icon-white"></i></a>
				</td>
			</tr>
		    {{/foreach}}
			<tr class="noline ttitle">
			  <td colspan="{{$td}}">
				<a class="check_all btn"><i class="icon-ok"></i>全选/反选</a>
				<a class="btn save_order" href="javascript:"><i class="icon-folder-close"></i>保存排序</a>
			  </td>
			</tr>
			<tr class="thead">
			  <td colspan="{{$td}}">
				{{include file="include/page.html"}}
			  </td>
			</tr>
		</tbody>
		{{/if}}
	</table>
	</form>
</div>
</div>

</body>
</html>